LED driver

ABSTRACT

In described examples, a circuit for controlling a light emitting diode (LED) includes a first flip flop including first and second control inputs. In response to assertion of a first control signal, the first flip flop generates a second control signal to control a first switch coupled in parallel with the LED. An edge detect circuit is coupled to an output of the first flip flop. In response to generation of the second control signal, the edge detect circuit generates a third control signal. A second flip flop includes third and fourth control inputs. The third control input is coupled to an output of the edge detect circuit. The second flip flop generates a fourth control signal to control a second switch coupled, via an inductor, to the first switch and the LED.

CROSS REFERENCE TO RELATED CASE(S)

This case contains subject matter that may be related to a copendingapplication entitled “LED DRIVER” having Ser. No. 15/859,081.

BACKGROUND

Light emitting diodes (LEDs) are used for a variety of purposes. An LEDdriver s an electrical circuit that provides a current to an LED tocause the LED to produce light. For some applications, the LED iscontrolled to produce light at varying amplitudes, and the LED driverattempts to produce an appropriate magnitude of current to the LED tothereby produce the desired light intensity.

SUMMARY

In on example, a circuit for controlling a light emitting diode (LED)includes a first flip flop including first and second control inputs togenerate a second control signal to control a first switch coupled inparallel with the LED responsive to assertion of a first control signal.An edge detect circuit, coupled to an output of the first flip flop, isto generate a third control signal responsive to generation of thesecond control signal. A second flip flop includes third and fourthcontrol inputs and is to generate a fourth control signal to control asecond switch coupled via an inductor to the first switch and the LED.The third control input is coupled to an output of the edge detectcircuit.

In another example, a circuit for controlling an LED includes a firstcomparator, a first flip flop including first and second control inputs,wherein the first control input is coupled to an output of the firstcomparator, and an edge detect circuit coupled to an output of the firstflip flop. A second flip flop includes third and fourth control inputs,wherein the third control input is coupled to an output of the edgedetect circuit. A second comparator has an output coupled to the secondflip flop.

Another example is directed to apparatus that includes a first flip flopincluding first and second control inputs and is to generate a secondcontrol signal to control a first switch coupled in parallel with theLED responsive to assertion of a first control signal to the firstcontrol input. A comparator is to compare a reference signal to a signalindicative of light detected by a photosensitive device and to providean output signal to the second control input of the first flip flop. Anedge detect circuit is coupled to an output of the first flip flop andis to generate a third control signal responsive to generation of thesecond control signal. A second flip flop including third and fourthcontrol inputs is to generate a fourth control signal to control asecond switch coupled, via an inductor, to the first switch and the LED.The third control input is coupled to an output of the edge detectcircuit.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 illustrates an example of a circuit that controls a lightemitting diode (LED);

FIG. 2 illustrates an example of current and light waveforms for theexample of FIG. 1.

FIG. 3 illustrates another example of a circuit that controls an LED.

DETAILED DESCRIPTION

The examples disclosed herein are directed to LED drivers that control apair of switches coupled to an LED. The LED may be used as a lightsource for a digital micromirror device (DMD), but can be used in otherapplications as well. The term “LED” includes semiconductor lightsources (e.g., PN junctions), laser diodes, etc. The control of theswitches are synchronized such that when current is caused to flowthrough the LED to create light, the current is at a consistent leveleach time the LED is turned on. As a result, the light produced by theLED has an intensity that is consistent each time the LED is activatedthereby avoiding, or at least reducing, flicker in the light produced bythe LED.

In one application, the DMD is used as an imaging producing source for aheads-up display (HUD) in an automobile. A DMD comprises an array ofindividually actuatable mirrors to reflect light from an LED either onto an image receiving surface such as the inside of the automobile'swindshield or elsewhere (e.g., a heat sink). A single LED may beincluded to shine light on the mirrors of the DMD, or multiple LEDs(e.g., red, green, and blue LEDs) may be used if a color is desired. Asa HUD for an automobile, the ability to vary the intensity of the lightfrom the LED is helpful because the automobile is operated in a varietyof different lighting conditions. For example, the LED should beoperated at brighter light levels during the day than at night.

In some implementations, the LED for the DMD is operated in a continuousmode for higher average current levels (and thus for greater lightintensity), whereas the LED is operated in a discontinuous mode forlower average current levels (and thus for lower light intensity).During the continuous mode of operation, the LED is on continuously togenerate light, but during the discontinuous mode of operation, switchescontrolling the LED are pulsed on and off. The embodiments describedherein improve discontinuous mode of operation for LED drivers toachieve lower light intensity levels while avoiding flicker.

FIG. 1 shows an example of a circuit for driving an LED for use with aDMD. The example of FIG. 1 includes a controller 100, a DMD 110, aswitch control circuit 120, an LED D1, a photosensor D2, a flyback diodeD3, sense resistors RS1 and RS2, comparators 140 and 142, switches SW1and SW2, switch drivers 130 and 135, and logic gate 150. The controller100 receives a video signal which is then processed to transmit signalsto the DMD 110 to control the tilt state of the individual mirrors tothereby create an image. The LED D1 shines light on the mirrors of theDMD. A current loop is formed from switch SW2, inductor L1, and theparallel combination of switch SW1 and LED D1. That is, SW1 is connectedin parallel with LED D1 and the combination of SW1/D1 is connected inseries with inductor L1 and switch SW2. Switch SW2 is coupled to avoltage source node (VDD). Current flows along any of multiple currentpaths as dictated by the state of the switches SW1 and SW2. If SW1 andSW2 are closed, current flows from VDD through SW2, through inductor L1and through SW1 to sense resistor RS1. If SW2 is closed and SW1 is open,then current flows from VDD, through SW2, through inductor L1 andthrough LED D1 to sense resistor RS1. Inductor L1 can store energy. Assuch, if SW2 is opened, inductor L1 provides a source of current whichflows from inductor L1 through either SW1 (if SW1 is closed) or throughLED D1 (if SW1 is open) to ground and back to inductor L1 through theflyback diode D3. As the energy in inductor L1 is of a limited amount,the loop current IL through the current loop (that is, the currentthrough SW2 and/or the inductor L1) decreases. Again closing SW2 causesthe loop current IL to increase. With current flowing through thecurrent loop, LED D1 is activated to produce light by opening SW1 anddeactivated to cease producing light by closing SW1.

References are made herein to opening and closing switches SW1 and SW2.The switches SW1 and SW2 are implemented as solid-state transistors andthus closing a switch means turning the transistor on. Opening a switchmeans turning the transistor off. SW1 and SW2 may be implemented asmetal oxide semiconductor field effector transistor (MOSFET) devices,bipolar junction transistor (BJT) devices, or other types of transistordevices.

Switch SW2 is controlled by the output of logic gate 150, although insome examples logic gate 150 is omitted and the switch driver 130 iscontrolled directly by the COMP2 output signal 145 from comparator 142.Logic gate may include an AND gate as shown in the example of FIG. 1,but can comprise other types of logic gates in other examples. Switchdriver 130 is coupled to the output of logic gate 150. Switch driver 130produces a sufficient voltage to control the state of SW2. One input tologic gate 150 includes the output signal 143 from comparator 140 (whichindicates whether the loop current IL is greater or less than athreshold as explained below). The other input to logic gate 150 iscoupled to an output of comparator 142. Photosensor D2 may beimplemented as a photodiode or other suitable type of photo-sensitivedevice. Photosensor D2 is coupled to a voltage supply VDD and to senseresistor RS2. Photosensor D2 generates a current that is proportional tothe amount of light it detects, which includes light generated by theLED D1. The voltage produced across the sense resistor RS2 (which is arelatively low resistance device) is a function of the current from thephotosensor D2 and thus a function of the intensity of light detected bythe photosensor D2.

The comparator 142 compares the signal from the photosensor D2 to areference signal TH2 (e.g., a reference voltage). The output 145 of thecomparator (COMP2) is provided to logic gate 150 and to controller 100.The output of the logic gate 150 is a logic high responsive to both (a)the intensity of the detected light being below a threshold set by thereference signal TH2 and (b) the magnitude of the loop current IL beingless than a threshold set by the reference signal TH1.

When either the intensity of the detected light is greater than thethreshold set by the reference signal TH2 or the magnitude of the loopcurrent is greater than the threshold set by the reference signal TH1,the output of logic gate 150 will become a logic low which causes SW2 toopen. With SW2 off, the inductor L1 produces the loop current. Thus, SW2is turned on and off in a control manner to maintain the loop current ILat a relatively stable level as shown in the example of FIG. 2,described below.

The controller 100 in the example of FIG. 1 generates a switch controlsignal 102 (labeled as SW_CTL) for SW1. Switch control signal 102 fromthe controller 100 is indicative of an intention to have SW1 open orclose and thus to have current flow to LED D1 to produce light for theDMD 110 or to have current flow through SW1 thereby bypassing LED D1 toprevent the LED D1 from producing light.

The switch control circuit 120 in this example includes an inverter 121,an AND gate 122 (or other type of logic gate), and an SR flip flop 123.The switch control circuit 120 can be implemented with different circuitarchitectures from that shown in FIG. 1. The “S” input of SR flip flop123 is coupled to the switch control signal 102. In one example, switchcontrol signal 102 is asserted to a logic high (e.g., 1) to have switchSW1 close. When the S input is a logic high (and the R input is logiclow (0)), the output (Q) of the SR flip flop 123 is a logic high. Theoutput of the SR flip flop 123 is provided to switch driver 135 whichproduces a sufficient voltage to control the state of SW1. With the Qoutput of the SR flip flop 123 at a logic high, switch SW1 is caused toclose thereby causing any loop current IL to flow through SW1 andbypassing the LED D1. The LED D1 will be off in this state.

The inverter 121 inverts the switch control signal 102. The output ofinverter 121 is coupled to an input of AND gate 122. The other input ofAND gate 122 is coupled to the output of comparator 140. Comparator 140compares the voltage across sense resistor RS1 to a reference signal(TH1, for example, a reference voltage). The sense resistor RS1 is arelatively low resistance resistive device that generates a voltageacross its terminals that is a function of the loop current IL. Bycomparing the voltage across sense resistor RS1 to TH1, the comparator140 determines whether the loop current is greater or less than areference current level.

With SW2 off and the inductor L1 is the current source, as the loopcurrent IL begins to fall the loop current (as measured by the voltageacross RS1) eventually reaches the threshold set by TH1. At that point,the output signal 143 of the comparator 140 (COMP1) changes from a logiclow to a logic high. At this point, both inputs of AND gate 122 are highand the R input of the SR flip flop 123 becomes high. The S input is lowdue to switch control signal 102 being low. The Q output of the SR flipflop 123 becomes a logic low, which through switch driver 135 turns offSW1. At that point, any loop current will flow through the LED D1thereby turning on the LED and producing light.

Further, because opening SW1 is synchronized to the point at which theloop current reaches a predetermined threshold (TH1), the currentthrough LED D1 will consistently be approximately the same every timethe LED D1 is turned on. FIG. 2 illustrates an example of a timingdiagram illustrating that the LED D1 has a consistent light intensitylevel every time it turns on during the discontinuous mode of operation.Curve 202 represents the loop current IL and curve 204 represents theintensity of the light. As can be seen from FIG. 2, the LED turns on atapproximately the same point in the current curve and thus the lightintensity is relatively consistent each time the LED D1 turns on.

After the LED D1 has been turned on, the controller 100 responds to alogic low on the output signal 145 from comparator 142 (indicative ofthe intensity of the light being below the reference signal TH2) byasserting the switch control signal 102 back to a logic high. With theswitch control signal 102 being a logic high, the S input to the SR flipflop 123 is a logic high and the R input is a logic low. This state ofthe inputs to the SR flip flop 123 causes the Q output to become a logichigh, which through switch driver 135 causes switch SW1 to close andthus LED D1 to turn off.

FIG. 3 shows another example of a circuit for controlling LED D1. Theexample of FIG. 3 includes a controller 300, DMD 110, LED D1, aphotosensor D2, a flyback diode D3, sense resistor RS1, switches SW1 andSW2, and switch drivers 130 and 135. As for the example of FIG. 1, thecontroller 300 receives a video signal which is then processed totransmit signals to the DMD 110 to control the tilt state of theindividual mirrors to create an image. A similar current loop isincluded in the circuit of FIG. 3 including switch SW2, inductor L1, andthe parallel combination of switch SW1 and LED D1.

The controller 300 of FIG. 3 includes a pulse generator 310, SR flipflops 312 and 330, an inverter 314, an edge detect circuit 320,comparators 340 and 342, and sense resistor RS3. A trans-impedanceamplifier can be used instead of a sense resistor. The controller 300can be fabricated as a part that includes the components shown in FIG.3. In other examples, the controller 300 includes some, but not all, ofthe components shown in FIG. 3. For example, the sense resistor RS3 maybe provided separate from controller 300.

The pulse generator 310 is coupled to the S input of SR flip flop 312and the Q output of the SR flip flop 312 is coupled to an input ofinverter 314. The output from comparator 340 is coupled to the R inputof SR flip flop 312. Similar to the configuration and operation ofcomparator 142 in FIG. 1, the comparator 340 compares a signal derivedfrom the photosensor D2 (the voltage across sense resistor RS3) to areference signal TH4 to produce an output signal to the SR flip flop 312that is indicative of whether the detected light signal is greater orsmaller than TH4.

The output of inverter 314 is provided to switch driver 135 to therebyturn SW1 on and off as was the case in the example of FIG. 1. The outputof inverter 314 also is provide to the edge detect circuit 320. The edgedetect circuit 320 in this example includes two D flip flops 321 and322, AND gate 323 and inverter 324. The output of inverter 314 isprovided to the D input of D flip flop 321 and the Q output of D flipflop 321 is provided to the D input flip flop 322. The Q output of Dflip flop 322 is provided to one of the inputs of AND gate 323. Theinput of inverter 324 is coupled to the Q output of D flip flop 321 andthe output of inverter 324 is coupled to the other input of AND gate323.

The output of AND gate 323 is coupled to the S input of SR flip flop330. The Q output of flip flop 330 coupled to switch driver 130 and isused to control the state of switch SW2. Comparator 342 functionssimilar to comparator 140 of FIG. 1 by comparing the voltage from senseresistor RS1 to a reference signal TH3 to generate a comparator outputsignal that is indicative of whether the loop current is greater orsmaller than a threshold.

To produce a sequences of light pulses using LED D1, the controller 300initializes SR flip flops 312 and 330 to a logic low output state (viasignaling not explicitly shown). The output of inverter 314 will be alogic high which causes switch SW1 to close thereby preventing LED D1from being on and generating light. The output of driver 130 will be alogic low which causes switch SW2 to open, preventing any furthercharging of energy in inductor L1.

The output of the pulse generator 310 becoming a logic high initiates atransition in the state of the controller 300 to turn on the LED D1. Thelogic high from the pulse generator 310 (with the output of thecomparator 340 being a logic low indicating the detected light intensityis below the corresponding threshold), causes the output of the SR flipflop 312 to be a logic high. The inverter 314 responds to a logic highon its input by producing a logic low on its output, which in turn turnsoff SW1 thereby causing loop current to flow to LED D1 to produce light.

The output of inverter 314 is provide to the edge detect circuit 320.The edge detect circuit 320 generates an output signal from AND gate 323that is asserted high responsive to detection of a logic high to logiclow transition on the output of the inverter 314 (indicative of a statein which the LED D1 should be turned on). The edge detect circuit worksas follows. D flip flop 322 stores the past state of the output ofinverter 314, while D flip flop 321 stores the current state of inverter314, at any particular instant. As the Q output of D flip flop 321 isinverted before connecting to AND gate 323, the AND gate will output alogic high whenever the past state of inverter 314 is high and thecurrent state of inverter 314 is low. Therefore, the edge detect circuit320 outputs a momentary pulse upon a falling edge of inverter 314.

The out of the AND gate 323 thus becomes high. The output of AND gate323 is provided to the S input of the SR flip flop 330, which causes theoutput of the SR flip flop 330 to become a logic high. A logic high onthe output of the SR flip flop 330 causes the switch driver 130 togenerate a voltage to switch SW2 at a sufficient voltage level to turnon SW2. Once SW2 closes (and as SW1 is open as explained above), currentbegins to flow from VDD through SW2, L1 and to LED D1 to thereby turn onLED D1. As such, LED D1 in this example circuit is consistently causedto be turned on with a similar loop current magnitude.

If the loop current level becomes greater than a threshold set byreference signal TH3, the output of comparator 342 becomes a logic high.The R input of SR flip flop 330 is then asserted high which (with the Sinput being low) causes the output from SR flip flop to be a logic lowthereby turning off SW2. Eventually, the loop current falls to zero andthe process repeats.

If the light intensity detected by the photosensor D2 becomes greaterthan a threshold set by reference signal TH4, the output of comparator340 becomes high. With the output of comparator 340 being, the output ofSR flip flop 312 is forced low, which through inverter 314 causes SW1 tobe closed thereby turning of LED D1.

In this description, the term “couple” or “couples” means either anindirect or direct wired or wireless connection. Thus, if a first devicecouples to a second device, that connection may be through a directconnection or through an indirect connection via other devices andconnections. The recitation “based on” means “based at least in parton.” Therefore, if X is based on Y, X may be a function of Y and anynumber of other factors.

Modifications are possible in the described embodiments, and otherembodiments are possible, within the scope of the claims.

What is claimed is:
 1. A circuit, comprising: a first flip flop having afirst output and first and second control inputs, the first outputadapted to be coupled to the first switch in parallel with a lightemitting diode (LED), and the first flip flop configured to generate afirst control signal at the first output responsive to a second controlsignal at the second control input; an edge detect circuit having asecond output and a detect input, the detect input coupled to the firstoutput, and the edge detect circuit configured to generate a thirdcontrol signal at the second output responsive to the first controlsignal; and a second flip flop having a third output and third andfourth control inputs, the third control input coupled to the secondoutput, the third output adapted to be coupled via a second switch andan inductor to the first switch in parallel with the LED, and the secondflip flop configured to generate a fourth control signal at the thirdoutput responsive to the third control signal.
 2. The circuit of claim1, further comprising a comparator having a comparator output and firstand second comparator inputs, the comparator output coupled to the firstcontrol input, the first comparator input adapted to be coupled to aphotosensitive device, the comparator configured to: compare aphotosensitive signal at the first comparator input to a referencesignal at the second comparator input, the photosensitive signalindicative of light detected by the photosensitive device; andresponsive to that comparison, generate a comparison signal at thecomparator output.
 3. The circuit of claim 2, wherein the first flipflop is configured to generate the first control signal at the firstoutput responsive to: the comparison signal; and the second controlsignal at the second control input.
 4. The circuit of claim 3, whereinthe first flip flop is configured to generate the first control signalat the first output to cause the first switch to close responsive to thecomparison signal indicating that light detected by the photosensitivedevice exceeds a threshold.
 5. The circuit of claim 4, wherein the firstflip flop is configured to generate the first control signal at thefirst output to cause the first switch to open responsive to the secondcontrol signal.
 6. The circuit of claim 5, wherein: the edge detectcircuit is configured to generate the third control signal at the secondoutput responsive to the first flip flop generating the first controlsignal to cause the first switch to open; and the second flip flop isconfigured to generate the fourth control signal at the third output tocause the second switch to close responsive to the third control signal.7. The circuit of claim 6, wherein the comparator is a first comparator,the comparator output is a first comparator output, the reference signalis a first reference signal, the comparison signal is a first comparisonsignal, and the circuit further comprises: a second comparator having asecond comparator output and third and fourth comparator inputs, thesecond comparator output coupled to the fourth control input, the thirdcomparator input adapted to be coupled to a voltage node, and the secondcomparator configured to: compare a voltage signal at the thirdcomparator input to a second reference signal at the fourth comparatorinput, the voltage signal indicative of current through the secondswitch; and responsive to that comparison, generate a second comparisonsignal at the second comparator output.
 8. The circuit of claim 7,wherein the threshold is a first threshold, and the second flip flop isconfigured to generate the fourth control signal at the third output tocause the second switch to open responsive to the second comparisonsignal indicating that current through the second switch exceeds asecond threshold.
 9. A circuit, comprising: a first comparator having afirst output; a second comparator having a second output; a first flipflop having a third output and first and second control inputs, thefirst control input coupled to the first output; an edge detect circuithaving a fourth output and a detect input, the detect input coupled tothe third output; and a second flip flop having a fifth output and thirdand fourth control inputs, the third control input coupled to the secondoutput, and the fourth control input coupled to the fourth output. 10.The circuit of claim 9, wherein the first comparator has first andsecond comparator inputs, the first comparator input adapted to becoupled to a photosensitive device, and the first comparator isconfigured to: compare a photosensitive signal at the first comparatorinput to a reference signal at the second comparator input, thephotosensitive signal indicative of light detected by the photosensitivedevice; and responsive to that comparison, generate a comparison signalat the first output.
 11. The circuit of claim 10, wherein the referencesignal is a first reference signal, the comparison signal is a firstcomparison signal, the second comparator has third and fourth comparatorinputs, the third comparator input adapted to be coupled to a voltagenode, and the second comparator is configured to: compare a voltagesignal at the third comparator input to a second reference signal at thefourth comparator input, the voltage signal indicative of currentthrough a first switch; and responsive to that comparison, generate asecond comparison signal at the second output.
 12. The circuit of claim11, further comprising an inverter coupled between the third output andthe detect input.
 13. The circuit of claim 11, wherein: the third outputis adapted to be coupled to a second switch in parallel with a lightemitting diode (LED); the fifth output is adapted to be coupled via thefirst switch and an inductor to the second switch in parallel with theLED; the first flip flop is configured to generate a first controlsignal at the third output responsive to a second control signal at thesecond control input; the edge detect circuit is configured to generatea third control signal at the fourth output responsive to the firstcontrol signal; and the second flip flop is configured to generate afourth control signal at the fifth output responsive to the thirdcontrol signal.
 14. The circuit of claim 13, wherein the second flipflop is configured to generate the fourth control signal at the fifthoutput to cause the first switch to open responsive to the secondcomparison signal indicating that current through the first switchexceeds a threshold.
 15. The circuit of claim 14, wherein the first flipflop is configured to generate the first control signal at the thirdoutput to cause the second switch to: close responsive to the firstcomparison signal indicating that light detected by the photosensitivedevice exceeds a second threshold; or open responsive to the secondcontrol signal.
 16. Apparatus, comprising: a comparator having a firstoutput and first and second comparator inputs, the first comparatorinput adapted to be coupled to a photosensitive device, the comparatorconfigured to: compare a photosensitive signal at the first comparatorinput to a reference signal at the second comparator input, thephotosensitive signal indicative of light detected by the photosensitivedevice; and responsive to that comparison, generate a comparison signalat the first output; a first flip flop having a second output and firstand second control inputs, the first control input coupled to the firstoutput, the second output adapted to be coupled to a first switch inparallel with a light emitting diode (LED), and the first flip flopconfigured to generate a first control signal at the second outputresponsive to: the comparison signal; and a second control signal at thesecond control input; an edge detect circuit having a third output and adetect input, the detect input coupled to the second output, and theedge detect circuit configured to generate a third control signal at thethird output responsive to the first control signal; and a second flipflop having a fourth output and third and fourth control inputs, thethird control input coupled to the third output, the fourth outputadapted to be coupled via a second switch and an inductor to the firstswitch in parallel with the LED, and the second flip flop configured togenerate a fourth control signal at the fourth output responsive to thethird control signal.
 17. The apparatus of claim 16, wherein thecomparator is a first comparator, the reference signal is a firstreference signal, the comparison signal is a first comparison signal,and the apparatus further comprises a second comparator having a fifthoutput and third and fourth comparator inputs, the fifth output coupledto the fourth control input, the third comparator input adapted to becoupled to a voltage node, and the second comparator configured to:compare a voltage signal at the third comparator input to a secondreference signal at the fourth comparator input, the voltage signalindicative of current through the second switch; and responsive to thatcomparison, generate a second comparison signal at the fifth output. 18.The apparatus of claim 17, wherein at least one of the first and secondflip flops includes an SR flip flop.
 19. The apparatus of claim 16,further comprising a pulse generator coupled to the second controlinput, the pulse generator configured to generate the second controlsignal.
 20. The apparatus of claim 16, wherein the first flip flop isconfigured to generate the first control signal at the second output tocause the first switch to close responsive to the comparison signalindicating that light detected by the photosensitive device exceeds athreshold.